<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
    <script type="text/javascript" src="/StudentInfo/utils/scripts/flat-ui.js"></script>
    <meta name="viewport"
          content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <link rel="shortcut icon" href="/StudentInfo/utils/image/favicon.ico"
          type="image/x-icon" />
    <meta charset="UTF-8">
    <title>学生信息管理系统</title>

    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css"/>
    <script src="${pageContext.request.contextPath}/back/statics/js/jquery-1.8.3.min.js"></script>
    <!-- Loading Flat UI Pro -->
    <link href="/StudentInfo/utils/css/flat-ui.css" rel="stylesheet">
    <!-- Loading Flat UI JS -->
    <script type="text/javascript" src="/StudentInfo/utils/scripts/flat-ui.min.js"></script>
    <script type='text/javascript' src='/StudentInfo/utils/scripts/particles.js'></script><link href="/StudentInfo/utils/css/animate.css" rel="stylesheet"></head>

<body>

<div class="container">
    <div class="row">
        <div class="col-md-12">
            <h5>选课</h5>
            <form name="studentquery" action="/StudentInfo/StudentHandler/queryy/1" method="get">
                <div class="row">
                    <div class="col-md-4">
                        <strong>查询条件<br></strong> <select name="serc"
                                                          class="form-control select select-primary select-block mbl">


                        <option value="all">全部课程</option>
                        <option value="sid">按课程编号查询</option>
                        <option value="nam">按课程名查询</option>
                        <option value="col">按所属学院查询</option>
                        <option value="type">按课程类型查询</option>

                    </select>
                    </div>
                    <div class="col-md-4">


                        <strong>条件</strong>

                        <div class="form-group has-feedback">

                            <input type="text" name="condition" placeholder="输入值"
                                   class="form-control" />

                        </div>

                    </div>
                    <div class="col-md-3 pos">
                        <br> <input type="submit" class="btn btn-primary" value="查询" />
                    </div>
                </div>
            </form>

        </div>
        <div class="col-md-12">
            <div class="row">
                <div class="col-md-12" >
                    <div class="margin:0 15px" style="overflow-x: scroll;">
                        <table
                                class="table table-striped table-hover animated fadeIn">

                            <thead>
                            <tr>
                                <th>课程号</th>
                                <th>课程名</th>
                                <th>课程简介</th>
                                <th>类型</th>
                                <th>所属学院</th>
                                <th>所属专业</th>
                                <th>选择</th>
                            </tr>
                            </thead>
                            <c:forEach var="course" items="${requestScope.courseList}">
                                <tr>
                                    <td>cd</td>
                                    <td>dcd</td>
                                    <td>gbtb</td>
                                    <td>nyjun</td>
                                    <td>dfwe</td>
                                    <td>wedcew</td>
                                    <td><a class="btn btn-default"
                                           href="/StudentInfo/StudentHandler/selcou/cc"> 选择
                                    </a></td>
                                </tr>
                            </c:forEach>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>




    <%--分页工具栏--%>
    <div class="row" style="margin-top: -300px">
        <div class="col-sm-12 text-center">
            <nav aria-label="Page navigation">
                <ul class="pagination">
                    <li>
                        <c:if test="${page>1}">
                            <a href="${pageContext.request.contextPath}/student/findAll?page=${page-1}&searchCol=${searchCol}&searchValue=${searchValue}" aria-label="Previous">
                                <span aria-hidden="true">&laquo;</span>
                            </a>
                        </c:if>
                    </li>
                    <c:forEach begin="1" step="1" end="${pages}" varStatus="state">
                        <li><a href="${pageContext.request.contextPath}/student/findAll?page=${state.count}&searchCol=${searchCol}&searchValue=${searchValue}">${state.count}</a></li>
                    </c:forEach>

                    <li>
                        <c:if test="${page<pages}">
                            <a href="${pageContext.request.contextPath}/student/findAll?page=${page+1}&searchCol=${searchCol}&searchValue=${searchValue}" aria-label="Previous">
                                <span aria-hidden="true">&raquo;</span>
                            </a>
                        </c:if>

                    </li>
                </ul>
            </nav>
        </div>
    </div>




</div>


<script>
    $("select").select2({
        dropdownCssClass : 'dropdown-inverse'
    });
</script>
<script type="text/javascript" src="/StudentInfo/utils/scripts/flat-ui.js"></script>
<script src="/StudentInfo/utils/scripts/bganimation.js"></script></body>
</html>